﻿using System.Collections.Generic;
using CILADA.TestAssembly;
using System;

namespace CILADA.TestAssemblyTwo
{
    class ReifiedGenerics
    {
        public void DoSomething(List<string> list)
        {
        }
        public void DoSomething(List<int> list)
        {
        }
        public void DoSomething(List<object> list)
        {
        }
        public void DoSomething(List<Family> list)
        {
            foreach (object o in list)
            {
                Console.WriteLine(o);
            }
        }
        public void DoSomething(List<Address> list)
        {
            foreach (Address a in list)
            {
                Console.WriteLine(a);
            }
        }
        public void DoSomething(List<TestingType> list)
        {
        }
        public void DoSomethingElse(int i, List<Animal> list)
        {
            list.Sort();
            Console.WriteLine("four times list length = " + i * list.Count);
        }
        public void DoSomethingElse2(int i, out List<Animal> list)
        {
            list = new List<Animal>();
            list.Sort();
            Console.WriteLine("four times list length = " + i * list.Count);
        }
        public void DoSomethingElse3(int i, List<Animal> list)
        {
            list = new List<Animal>();
            list.Sort();
            Console.WriteLine("four times list length = " + i * list.Count);
        }
        public void DoSomethingElseAgain(int i, ref List<Animal> list)
        {
            list.Sort();
            list.Add(new Cat());
            Console.WriteLine("four times list length = " + i * list.Count);
        }
    }
}
